package com.cupk.entities;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("fundings")
public class Funding {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("project_id")
    private Long projectId;

    @TableField("description") // [修改] description_item -> description
    private String description;

    @TableField("amount")
    private BigDecimal amount;

    @TableField("transaction_date")
    private LocalDate transactionDate;

    @TableField("funding_type") // [修改] type -> funding_type
    private String fundingType; // INCOME, EXPENSE

    @TableField("category") // [新增]
    private String category;

    @TableField("receipt_number") // [新增]
    private String receiptNumber;

    @TableField("notes")
    private String notes;

    @TableField("recorded_by_id")
    private Long recordedById;

    @TableField("approval_status") // [新增]
    private String approvalStatus; // PENDING, APPROVED, REJECTED

    @TableField("approver_id") // [新增]
    private Long approverId;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
}